import request from '@/utils/request.js'

//登录接口
export const userLogin = (accounts,password)=>
request.get(`app/player/login?accounts=${accounts}&password=${password}`)

//新增接口
//职业Job -学生0/老师1/管理员2
export const createUser = ({accounts,password,nick,sex,school,speciality,classstr,job})=>
request.post('app/player',{accounts,password,nick,sex,school,speciality,classstr,job})

//带分页查询
export const getUsersPage=({Storing,SkipCount,MaxResultCount})=>
request.get(`app/player?Storing=${Storing}&SkipCount=${SkipCount}&MaxResultCount=${MaxResultCount}`)

//更新
export const updateUser = ({id,accounts,password,nick,sex,school,speciality,classstr,job})=>
request.put(`app/player/${id}`,{accounts,password,nick,sex,school,speciality,classstr,job})
//删除
export const deleteUser =(id)=>
request.delete(`app/playser/${id}`)